import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/warning/get_all_device_type_entity.dart';
import 'package:safetymonitor/app/data/common/choice_bean.dart';


GetAllDeviceTypeEntity $GetAllDeviceTypeEntityFromJson(Map<String, dynamic> json) {
  final GetAllDeviceTypeEntity getAllDeviceTypeEntity = GetAllDeviceTypeEntity();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    getAllDeviceTypeEntity.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    getAllDeviceTypeEntity.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    getAllDeviceTypeEntity.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    getAllDeviceTypeEntity.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    getAllDeviceTypeEntity.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    getAllDeviceTypeEntity.id = id;
  }
  final int? companyId = jsonConvert.convert<int>(json['companyId']);
  if (companyId != null) {
    getAllDeviceTypeEntity.companyId = companyId;
  }
  final String? companyName = jsonConvert.convert<String>(json['companyName']);
  if (companyName != null) {
    getAllDeviceTypeEntity.companyName = companyName;
  }
  final int? systemId = jsonConvert.convert<int>(json['systemId']);
  if (systemId != null) {
    getAllDeviceTypeEntity.systemId = systemId;
  }
  final String? systemName = jsonConvert.convert<String>(json['systemName']);
  if (systemName != null) {
    getAllDeviceTypeEntity.systemName = systemName;
  }
  final int? systemType = jsonConvert.convert<int>(json['systemType']);
  if (systemType != null) {
    getAllDeviceTypeEntity.systemType = systemType;
  }
  final String? monitorCode = jsonConvert.convert<String>(json['monitorCode']);
  if (monitorCode != null) {
    getAllDeviceTypeEntity.monitorCode = monitorCode;
  }
  final String? monitorName = jsonConvert.convert<String>(json['monitorName']);
  if (monitorName != null) {
    getAllDeviceTypeEntity.monitorName = monitorName;
  }
  final String? deviceCode = jsonConvert.convert<String>(json['deviceCode']);
  if (deviceCode != null) {
    getAllDeviceTypeEntity.deviceCode = deviceCode;
  }
  final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
  if (deviceName != null) {
    getAllDeviceTypeEntity.deviceName = deviceName;
  }
  final int? tenantId = jsonConvert.convert<int>(json['tenantId']);
  if (tenantId != null) {
    getAllDeviceTypeEntity.tenantId = tenantId;
  }
  final int? deviceStatus = jsonConvert.convert<int>(json['deviceStatus']);
  if (deviceStatus != null) {
    getAllDeviceTypeEntity.deviceStatus = deviceStatus;
  }
  final String? systemCode = jsonConvert.convert<String>(json['systemCode']);
  if (systemCode != null) {
    getAllDeviceTypeEntity.systemCode = systemCode;
  }
  final int? onlineStatus = jsonConvert.convert<int>(json['onlineStatus']);
  if (onlineStatus != null) {
    getAllDeviceTypeEntity.onlineStatus = onlineStatus;
  }
  final String? disposalTime = jsonConvert.convert<String>(json['disposalTime']);
  if (disposalTime != null) {
    getAllDeviceTypeEntity.disposalTime = disposalTime;
  }
  final String? alarmTime = jsonConvert.convert<String>(json['alarmTime']);
  if (alarmTime != null) {
    getAllDeviceTypeEntity.alarmTime = alarmTime;
  }
  final bool? isChecked = jsonConvert.convert<bool>(json['isChecked']);
  if (isChecked != null) {
    getAllDeviceTypeEntity.isChecked = isChecked;
  }
  final bool? isExpand = jsonConvert.convert<bool>(json['isExpand']);
  if (isExpand != null) {
    getAllDeviceTypeEntity.isExpand = isExpand;
  }
  return getAllDeviceTypeEntity;
}

Map<String, dynamic> $GetAllDeviceTypeEntityToJson(GetAllDeviceTypeEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['companyId'] = entity.companyId;
  data['companyName'] = entity.companyName;
  data['systemId'] = entity.systemId;
  data['systemName'] = entity.systemName;
  data['systemType'] = entity.systemType;
  data['monitorCode'] = entity.monitorCode;
  data['monitorName'] = entity.monitorName;
  data['deviceCode'] = entity.deviceCode;
  data['deviceName'] = entity.deviceName;
  data['tenantId'] = entity.tenantId;
  data['deviceStatus'] = entity.deviceStatus;
  data['systemCode'] = entity.systemCode;
  data['onlineStatus'] = entity.onlineStatus;
  data['disposalTime'] = entity.disposalTime;
  data['alarmTime'] = entity.alarmTime;
  data['isChecked'] = entity.isChecked;
  data['isExpand'] = entity.isExpand;
  return data;
}

extension GetAllDeviceTypeEntityExtension on GetAllDeviceTypeEntity {
  GetAllDeviceTypeEntity copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    int? companyId,
    String? companyName,
    int? systemId,
    String? systemName,
    int? systemType,
    String? monitorCode,
    String? monitorName,
    String? deviceCode,
    String? deviceName,
    int? tenantId,
    int? deviceStatus,
    String? systemCode,
    int? onlineStatus,
    String? disposalTime,
    String? alarmTime,
    bool? isChecked,
    bool? isExpand,
  }) {
    return GetAllDeviceTypeEntity()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..companyId = companyId ?? this.companyId
      ..companyName = companyName ?? this.companyName
      ..systemId = systemId ?? this.systemId
      ..systemName = systemName ?? this.systemName
      ..systemType = systemType ?? this.systemType
      ..monitorCode = monitorCode ?? this.monitorCode
      ..monitorName = monitorName ?? this.monitorName
      ..deviceCode = deviceCode ?? this.deviceCode
      ..deviceName = deviceName ?? this.deviceName
      ..tenantId = tenantId ?? this.tenantId
      ..deviceStatus = deviceStatus ?? this.deviceStatus
      ..systemCode = systemCode ?? this.systemCode
      ..onlineStatus = onlineStatus ?? this.onlineStatus
      ..disposalTime = disposalTime ?? this.disposalTime
      ..alarmTime = alarmTime ?? this.alarmTime
      ..isChecked = isChecked ?? this.isChecked
      ..isExpand = isExpand ?? this.isExpand;
  }
}